#ifndef _ISYNCHRONIZER_H_
#define _ISYNCHRONIZER_H_
#include <QObject>
#include <chrono>

class ISynchronizer : public QObject
{
    Q_OBJECT

public:

    using QObject::QObject;

    virtual ~ISynchronizer() {}

    Q_INVOKABLE virtual double clock() = 0;

    Q_INVOKABLE virtual bool isPausing() = 0;

    Q_INVOKABLE virtual void pause() = 0;

    Q_INVOKABLE virtual void resume() = 0;

    Q_INVOKABLE virtual void start() = 0;

    Q_INVOKABLE virtual void stop() = 0;

    Q_INVOKABLE virtual void seek(double) = 0;

    Q_INVOKABLE virtual void setMaxDuration(double maxDuration) = 0;

    Q_INVOKABLE virtual void setPresentSpeed(double speed) = 0;

    Q_INVOKABLE virtual double presentSpeed() = 0;

signals:
    void clockChanged();
};

Q_DECLARE_INTERFACE(ISynchronizer, "org.BNSPlayer.synchronizer")

#endif
